<?php
define('EmpireCMSAdmin','1');
require_once("../class/connect.php");
require_once("../class/db_sql.php");
require_once("../class/functions.php");
require_once("../class/user.php");
require_once("../class/say.php");
$link=db_connect();
$empire=new mysqlquery();

	$act_id=$_REQUEST['id'];
	$sql="SELECT onclick ,onclick,status,comment_num,focus_num,join_person_num as join_num  FROM phome_ecms_actives WHERE id='{$act_id}'";
	$focusStatus=false;
	$register=false;
	if($lguserid){
			$arr=array("uid"=>$lguserid,"t_uid"=>$act_id,"type_id"=>ACT_FOCUS_ID,"status"=>1);
			$focusStatus=DbTouch('phome_jat_focus',$arr)==false?0:1;			
	}
	
	$rarr=array("uid"=>$lguserid,"act_id"=>$act_id);
	$register=DbTouch('phome_jat_act_registration',$rarr);	
	if($register==false){
		$rStatus=-1;
	}else{
		//print_r($register);
		$rStatus=$register['status'];
	}
	
	$r=$empire->fetch1($sql);
	if($r){
		echo json_encode(array("flag"=>1,"data"=>$r,'focused'=>$focusStatus,"reged"=>$rStatus));
		exit();
	}else{
		echo json_encode(array("flag"=>0,"msg"=>"该记录不存在！"));
		exit();
	}
?>